package com.hyst.repository;

import java.util.List;
import java.util.Map;

import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import com.hyst.domain.CurriculumSchedule;
import com.hyst.domain.CurriculumScheduleView;
import com.hyst.domain.PurchaseCourse;

import tk.mybatis.mapper.common.Mapper;

public interface CurriculumScheduleMapper extends Mapper<CurriculumSchedule> {
	List<CurriculumSchedule> creatCS(PurchaseCourse purchaseCourse);

	/**
	 * @Description:
	 * @param inserts
	 *            void
	 */
	void addAll(List<CurriculumSchedule> list);

	Map<String, String> countLastMonth(String studentId);

	List<CurriculumScheduleView> getViewByPurchaseCourse(CurriculumSchedule curriculumSchedule);

	CurriculumScheduleView getView(CurriculumSchedule curriculumSchedule);


	List<CurriculumScheduleView> getByTeacherIdAndDate(CurriculumSchedule curriculumSchedule);

	/**
	 * @Description:
	 * @param purchaseCourseId
	 * @return String
	 */
	void deleteByPurchaseCourseId(String purchaseCourseId);

	/**
	 * @Description:
	 * @param pcid
	 * @return List<Map<String,String>>
	 */
	List<Map<String, String>> countByStateAndPc(String pcid);

	List<CurriculumScheduleView> getStudentLeval(Map<String, String> map);

	/**
	 * @Description:根据购买id查询不同的时长、时间段课程安排
	 * @param purchaseCourseId
	 * @return List<CurriculumSchedule>
	 */
	List<CurriculumSchedule> getByPurchaseCourseId(String purchaseCourseId);

	/**
	 * @Description:获取某门课程最后的上课日期
	 * @param purchaseCourseId
	 * @return String
	 */
	String getLastClassDate(String purchaseCourseId);

	/**
	* @Description: 
	* @param purchaseCourseId	void
	*/ 
	int reductionByPcUid(String purchaseCourseId);

	List<CurriculumScheduleView> getCurriculumsByDays(@Param("teacherId") String teacherId,@Param("leaveDays") List<String> leaveDays);

	String getMaterial(Integer id);

	int addOne(CurriculumSchedule curriculumSchedule);

	Integer getIdNew();

	String getLog(Integer id);

	void deleteSchedule(Integer id);

	void updateHour(String uniqueid);

	void updateHours(Integer hours);

	void updateHours2(Integer hours);

	void updateState(Integer id);

	void updateDelete(String id);


	void updateDeleteById(Long id);

}
